//
//  BaseViewController.h
//  PlayCatchGame
//
//  Created by 流言 on 2018/1/15.
//  Copyright © 2018年 清正. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 设置导航item位置
 
 - BaseBarItemDirectionLeft: 左道航
 - BaseBarItemDirectionRight: 右导航
 */
typedef NS_ENUM(NSInteger, BaseBarItemDirection) {
    BaseBarItemDirectionLeft,
    BaseBarItemDirectionRight,
};

/**
 点击导航上的item回调
 @param button 返回按钮对象
 */
typedef void(^navItemBlock)(UIButton *button);

@interface BaseViewController : UIViewController


/** nav左右图片item
 *  @param direction item方向
 *  @param image item背景图片
 */
- (UIButton *)showNavigatioBarSeat:(BaseBarItemDirection)direction withImage:(UIImage*)image;

/** nav左右文字item
 *  @param direction item方向
 *  @param title item标题
 */
- (UIButton *)showNavigatioBarSeat:(BaseBarItemDirection)direction withTitle:(NSString*)title;

- (void)barItemLeftButtonClick:(UIButton*)button;

- (void)barItemRightButtonClick:(UIButton*)button;

/** 网络变化收到通知
 *  notificat.objece 实际类型 NSError (NSError *error =(NSError*)notificat.object;)
 *  error.code =200 wifi
 *  error.code =400 移动网络
 *  error.code =500 无网络连接
 *  error.userInfo[@"msg"] 提示信息
 */
- (void)networkChange:(NSNotification*)notificat;

@end
